<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/V_small_order_item.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/V_good_distri.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "商品信息表",
        name: "V_good_distri",
        url: "/V_good_distri/",
        sortName: "id",
        paginationSize: 99999999,
        paginationHide: true,
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: { name: "", code: "", distributionid: "" },
      searchFormOptions: [
        [
          { title: "商品名称", field: "name", type: "like" },
          { title: "商品编码", field: "code", type: "like" },
          {
            dataKey: "distributorList",
            data: [],
            title: "分销商名称",
            field: "distributionid",
            type: "select",
          },
        ],
      ],
      columns: [
        {
          field: "name",
          title: "商品名称",
          type: "string",
          width: 120,
          align: "left",
          sortable: true,
        },
        {
          field: "code",
          title: "商品编码",
          type: "string",
          width: 80,
          align: "left",
        },
        {
          field: "attributes",
          title: "属性",
          type: "string",
          width: 80,
          align: "left",
        },
        {
          field: "sellingPrice",
          title: "门市价",
          type: "string",
          width: 60,
          align: "left",
        },
        {
          field: "settlementPrice",
          title: "结算价",
          type: "string",
          width: 60,
          align: "left",
        },
        {
          field: "effectiveStartDate",
          title: "有效开始时间",
          type: "datetime",
          width: 120,
          align: "left",
          sortable: true,
        },
        {
          field: "effectiveEndDate",
          title: "有效结束时间",
          type: "datetime",
          width: 120,
          align: "left",
          sortable: true,
        },
        {
          field: "spare1",
          title: "销售库存",
          type: "string",
          width: 60,
          align: "left",
        },
        {
          field: "distributionid",
          title: "分销商名称",
          type: "string",
          width: 80,
          align: "left",
          bind: { key: "distributor_name", data: [] },
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
